home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / includ~1.z / includ~1 / limits.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-02  |  3.2 KB  |  64 lines

  1. /* The <limits.h> header defines some basic sizes, both of the language types 
  2.  * (e.g., the number of bits in an integer), and of the operating system (e.g.
  3.  * the number of characters in a file name.
  4.  */
  5.  
  6. #ifndef _LIMITS_H
  7. #define _LIMITS_H
  8.  
  9. /* Definitions about chars (8 bits in MINIX, and signed).        */
  10. #define CHAR_BIT           8    /* # bits in a char            */
  11. #define CHAR_MIN        -128    /* minimum value of a char        */
  12. #define CHAR_MAX         127    /* maximum value of a char        */
  13. #define SCHAR_MIN       -128    /* minimum value of a signed char    */
  14. #define SCHAR_MAX        127    /* maximum value of a signed char    */
  15. #define UCHAR_MAX        255    /* maximum value of an unsigned char    */
  16. #define MB_LEN_MAX         1    /* maximum length of a multibyte char    */
  17.  
  18. /* Definitions about shorts (16 bits in MINIX).                */
  19. #define SHRT_MIN      -32768    /* minimum value of a short        */
  20. #define SHRT_MAX       32767    /* maximum value of a short        */
  21. #define USHRT_MAX      65535    /* maximum value of unsigned short    */
  22.  
  23. /* Definitions about ints (16 bits in MINIX for 8088, 80286, Atari etc) */
  24. #define INT_MIN          -32768    /* minimum value of an int        */
  25. #define INT_MAX           32767    /* maximum value of an int        */
  26. #define UINT_MAX       65535    /* maximum value of an unsigned int    */
  27.  
  28. /*Definitions about longs (32 bits in MINIX).                */
  29. #define LONG_MIN -2147483648    /* minimum value of a long        */
  30. #define LONG_MAX  2147483647    /* maximum value of a long        */
  31. #define ULONG_MAX 4294967295    /* maximum value of an unsigned long    */
  32.  
  33. /* Minimum sizes required by the POSIX P1003.1 standard (Table 2-2).    */
  34. #ifdef _POSIX_SOURCE        /* these are only visible for POSIX     */
  35. #define _POSIX_ARG_MAX  4096    /* exec() may have 4K worth of args    */
  36. #define _POSIX_CHILD_MAX   6    /* a process may have 6 children    */
  37. #define _POSIX_LINK_MAX    8    /* a file may have 8 links        */
  38. #define _POSIX_MAX_CANON 255    /* size of the canonical input queue    */
  39. #define _POSIX_MAX_INPUT 255    /* you can type 255 chars ahead        */
  40. #define _POSIX_NAME_MAX   14    /* a file name may have 14 chars    */
  41. #define _POSIX_NGROUPS_MAX 0    /* supplementary group IDs are optional    */
  42. #define _POSIX_OPEN_MAX   16    /* a process may have 16 files open    */
  43. #define _POSIX_PATH_MAX  255    /* a pathname may contain 255 chars    */
  44. #define _POSIX_PIPE_BUF  512    /* pipes writes of 512 bytes are atomic    */
  45.  
  46. #endif /* _POSIX_SOURCE */
  47.  
  48. /* Values actually implemented by MINIX (Tables 2-3, 2-4, and 2-5).    */
  49. /* Some of these old names had better be defined when not POSIX.    */
  50. #define _NO_LIMIT        100    /* arbitrary number; limit not enforced */
  51.  
  52. #define NGROUPS_MAX        0    /* supplemental group IDs not available    */
  53. #define ARG_MAX         4096    /* # bytes of args + environ for exec()    */
  54. #define CHILD_MAX  _NO_LIMIT    /* MINIX does not limit children    */
  55. #define OPEN_MAX          20    /* # open files a process may have    */
  56. #define LINK_MAX         127    /* # links a file may have        */
  57. #define MAX_CANON     255    /* size of the canonical input queue    */
  58. #define MAX_INPUT        255    /* size of the type-ahead buffer    */
  59. #define NAME_MAX          14    /* # chars in a file name        */
  60. #define PATH_MAX         255    /* # chars in a path name        */
  61. #define PIPE_BUF         512    /* # bytes in atomic write to a pipe    */
  62.  
  63. #endif /* _LIMITS_H */
  64.